<?php

class IndexController extends Controller {
    public function index(){
    	$this->assign('title',"康冠智库");
		$this->display();
    }
    public function login(){
    	$m=M('User');
    	$user['name']=$_POST['name'];
    	$user['password']=md5($_POST['password']);
    	$data=$m->field('name')->where($user)->select();
    	if($data!=""){
    		$this->ajaxReturn($data);
    	}else{
    		$data = array('count'=>0);
			$this->ajaxReturn($data);
    	}
    }
}